<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "lydb_buyjob".
 *
 * @property integer $id
 * @property string $good_id
 * @property integer $user_num
 * @property integer $user_num_real
 * @property integer $buy_num
 * @property integer $buy_num_real
 * @property integer $is_buy_open
 * @property integer $is_open
 * @property string $win_user
 * @property integer $receipt_time
 * @property integer $share_time_pre
 * @property integer $share_time
 * @property integer $create_time
 */
class BuyJob extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'lydb_buyjob';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['good_id', 'user_num'], 'required'],
            [['user_num','issue', 'user_num_real', 'buy_num', 'buy_num_real', 'is_buy_open', 'is_open', 'receipt_time', 'share_time_pre', 'share_time', 'create_time'], 'integer'],
            [['good_id', 'win_user'], 'string', 'max' => 255],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'good_id' => '商品id',
            'issue' => '当前期数',
            'user_num' => '计划用户数量',
            'user_num_real' => '实际用户数量',
            'buy_num' => '计划购买数',
            'buy_num_real' => '实际购买数',
            'is_buy_open' => 'Is Buy Open',
            'is_open' => 'Is Open',
            'win_user' => 'Win User',
            'receipt_time' => 'Receipt Time',
            'share_time_pre' => 'Share Time Pre',
            'share_time' => 'Share Time',
            'create_time' => 'Create Time',
        ];
    }
}
